//
//  LVLeveWorldRoundButton.m
//  LEVE
//
//  Created by 王若聪 on 2017/3/7.
//  Copyright © 2017年 dashuju. All rights reserved.
//

#import "LVLeveWorldRoundButton.h"

@implementation LVLeveWorldRoundButton

//- (instancetype)initWithFrame:(CGRect)frame{
//    self = [super initWithFrame:frame];
//    if (self) {
//        
//        self.backgroundColor = [UIColor redColor];
//        self.layer.cornerRadius = frame.size.height * 0.5;
//        self.layer.masksToBounds = YES;
//        
//        self.layer.borderWidth = 1;
//        self.layer.borderColor = [UIColor whiteColor].CGColor;
//        self.backgroundColor = [UIColor clearColor];
//        
//        self.titleLabel.font = [UIFont systemFontOfSize:13];
//
//    }
//    
//    return self;
//}

- (void)drawRect:(CGRect)rect{
    
    self.layer.borderWidth = 1;
    self.layer.borderColor = [UIColor whiteColor].CGColor;
    self.backgroundColor = [UIColor clearColor];
    
    self.titleLabel.font = [UIFont systemFontOfSize:13];
    
    self.layer.opacity = 0.5;
    [self setTitleColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.5]
                     forState:UIControlStateNormal];

    
    self.layer.cornerRadius = 15;
    self.layer.masksToBounds = YES;
}

- (void)yellowStyle{
    self.layer.borderColor = [UIColor colorWithRed:224/255.0 green:181/255.0 blue:50/255.0 alpha:1].CGColor;
    [self setTitleColor:[UIColor colorWithRed:224/255.0 green:181/255.0 blue:50/255.0 alpha:1] forState:UIControlStateNormal];
    self.layer.opacity = 1;
}
@end
